<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>oauth login</title>
    <style>
        #welcome {
            display: block;
            width: 100%;
            text-align: right;
            overflow: hidden;
            -webkit-animation: marquee 20s linear infinite;
            animation: marquee 20s linear infinite;
        }

        @-webkit-keyframes marquee {
            0% {
                transform: translateX(15%);
            }
            100% {
                transform: translateX(-100%); // 每行高50
            }
        }

        @keyframes marquee {
            0% {
                transform: translateX(15%);
            }
            100% {
                transform: translateX(-100%); // 每行高50
            }
        }

        @-webkit-keyframes marquee {
            0% {
                transform: translateX(15%);
            }
            100% {
                transform: translateX(-100%); // 每行高50
            }
        }
    </style>
</head>
<body>
<p id="welcome">登陆中，请稍后......请勿关闭本页面，否则无法实现第三方自动登录</p>
<script th:inline="javascript" th:if="${error == null}">
    window.onload = function () {
        window.opener.postMessage([[${token}]], [[${domain}]]);
        window.close();
    }
</script>
<script th:inline="javascript" th:if="${error != null}">
    window.onload = function () {
        window.opener.postMessage("error:" + [[${error}]], [[${domain}]]);
        window.close();
    }
</script>
</body>
</html>